package com.acce.product.utils;

import org.apache.commons.codec.binary.Base64;

public class AlgorithmsUtil {
	
	/** 
     * @param bytes 
     * @return 
     */  
    public static byte[] decodeBase64(final byte[] bytes) {
        return Base64.decodeBase64(bytes);
    }  
  
    /** 
     * 二进制数据编码为BASE64字符串 
     * 
     * @param bytes 
     * @return 
     * @throws Exception 
     */  
    public static String encodeBase64(final byte[] bytes) {
        return new String(Base64.encodeBase64(bytes));
    } 
}
